import java.util.ArrayList;

import cupk.cars.*;

import java.util.List;

public class Main {
    public static void main(String[] args) {
        List<Cars> carList = new ArrayList<Cars>();
        carList.add(Factory.getCarName("奥迪"));
        carList.add(Factory.getCarName("奔驰"));
        carList.add(Factory.getCarName("宝马"));
        carList.add(Factory.getCarName("特斯拉"));

        for (Cars currentCar : carList){
            System.out.println(currentCar.showCars());
        }
    }
}